package a.f.h.a.b;

import a.c.ab;
import a.c.n;
import a.f.j.cb;

public class i
  implements a.f.j.m
{
  private a.c.q a;
  private a.f.h.a.a.b b;
  private cb c;
  private b d;
  private ab e;
  private ab f;
  private int g = 0;
  private boolean h = true;
  private boolean i = false;
  public static final int j = 0;
  public static final int k = 1;
  public static boolean l;
  
  public i(b paramb, ab paramab)
  {
    a(paramb);
    this.e = paramab;
  }
  
  public void b() {}
  
  public void a(b paramb)
  {
    this.d = paramb;
    this.a = this.d.d();
    this.b = this.d.b();
  }
  
  public void a(cb paramcb)
  {
    this.c = paramcb;
  }
  
  public b c()
  {
    return this.d;
  }
  
  public void a(int paramInt)
  {
    this.g = paramInt;
  }
  
  public int d()
  {
    return this.g;
  }
  
  public void a(boolean paramBoolean)
  {
    this.h = paramBoolean;
  }
  
  public boolean e()
  {
    return this.h;
  }
  
  public void b(boolean paramBoolean)
  {
    this.i = paramBoolean;
  }
  
  public boolean f()
  {
    return this.i;
  }
  
  private ab g()
  {
    boolean bool = b.i;
    int n = b.h;
    ab localab1 = new ab();
    ab[] arrayOfab = a.a.m.d(this.a);
    int m = 0;
    do
    {
      if (m >= arrayOfab.length) {
        break;
      }
      ab localab2 = arrayOfab[m];
      if (n != 0) {
        break label73;
      }
      if (!bool)
      {
        if (localab2.size() > 1) {
          localab1.a(localab2);
        }
        m++;
      }
    } while (n == 0);
    label73:
    return localab1;
  }
  
  public void a()
  {
    boolean bool = b.i;
    int n = b.h;
    a.c.d[] arrayOfd = this.c.a().u();
    this.d.a(this.c);
    ab localab1 = g();
    d locald = h();
    locald.a(this.d);
    this.f = locald.a();
    if (!bool) {
      if (this.g == 1) {
        b(this.f);
      }
    }
    ab localab2 = e.a(this.d);
    g.a(this.d);
    this.d.h();
    k localk = new k(this.d);
    localk.a(this.h);
    localk.a(this.f);
    localk.a();
    if (!bool)
    {
      if (this.i)
      {
        h localh = new h(this.d);
        localh.a(localab1);
      }
      this.d.i();
      l.a(this.d, this.e);
    }
    int m = 0;
    while (m < arrayOfd.length)
    {
      a(arrayOfd[m], this.d.d(arrayOfd[m]));
      m++;
      if (n != 0)
      {
        if (!bool) {}
        a.c.q.n = !a.c.q.n;
      }
    }
    if (a.c.q.o) {
      b.i = !bool;
    }
  }
  
  private ab a(ab paramab)
  {
    boolean bool = b.i;
    int m = b.h;
    if (!bool) {
      if (paramab == null) {
        return null;
      }
    }
    ab localab = new ab();
    a.c.m localm = paramab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (!bool)
      {
        if (!this.d.p(locald)) {
          localab.add(locald);
        }
        localm.f();
      }
    } while (m == 0);
    return localab;
  }
  
  private void a(a.c.d paramd, ab paramab)
  {
    boolean bool = b.i;
    int n = b.h;
    n localn = (n)this.a.c(a.f.h.i.w);
    a.f.h.k localk1 = (a.f.h.k)localn.get(paramd);
    ab localab = a(paramab);
    if ((localk1 != null) && (localab != null))
    {
      int m = 0;
      a.c.m localm = localab.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.f.h.k localk2 = localk1.d();
        if (!bool) {
          if (m > 0) {
            localk2.a(0.0D);
          }
        }
        if (!bool)
        {
          if (m < localab.size() - 1) {
            localk2.b(0.0D);
          }
          localn.a(localm.a(), localk2);
          localm.f();
          m++;
        }
      } while (n == 0);
    }
  }
  
  private d h()
  {
    switch (this.g)
    {
    case 0: 
      return new j();
    case 1: 
      return new q();
    }
    throw new RuntimeException("Bad subgraph algorithm!");
  }
  
  private void b(ab paramab)
  {
    boolean bool = b.i;
    int n = b.h;
    this.d.h();
    if (!bool) {
      if (o.c(this.a, this.b))
      {
        this.d.i();
        return;
      }
    }
    a.c.d[] arrayOfd = this.a.u();
    int m = 0;
    do
    {
      if (m >= arrayOfd.length) {
        break;
      }
      a.c.d locald = arrayOfd[m];
      if (n != 0) {
        break label105;
      }
      if (!bool)
      {
        if (this.d.a(locald)) {
          this.a.a(locald);
        }
        m++;
      }
    } while (n == 0);
    label105:
    Object localObject = this.f.l();
    if (((a.c.m)localObject).e()) {}
    for (;;)
    {
      if (!bool)
      {
        this.a.g(((a.c.m)localObject).a());
        ((a.c.m)localObject).f();
        if (n == 0)
        {
          if (n == 0) {
            break;
          }
          this.f = null;
          if (bool) {
            continue;
          }
          a(0);
        }
      }
    }
    localObject = h();
    ((d)localObject).a(this.d);
    this.f = ((d)localObject).a();
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.h.a.b.i
 * JD-Core Version:    0.7.0.1
 */